.TH "IXP_PSTRING" 3 "2012 Dec" "libixp Manual"


.SH NAME

.P
ixp_pstring

.SH SYNOPSIS

.nf
#include <ixp.h>

void ixp_pstring(IxpMsg *msg, char **s);
.fi


.SH DESCRIPTION

.P
Packs or unpacks a UTF\-8 encoded string. The packed
representation of the string consists of a 16\-bit unsigned
integer followed by the contents of the string. The unpacked
representation is a nul\-terminated character array.

.P
If \fImsg\fR\->mode is MsgPack, the string pointed to by \fIs\fR is
packed into the buffer at \fImsg\fR\->pos. If \fImsg\fR\->mode is
MsgUnpack, the address pointed to by \fIs\fR is loaded with a
malloc(3) allocated, nul\-terminated representation of the
string packed at \fImsg\fR\->pos. In either case, \fImsg\fR\->pos is
advanced by the number of bytes read or written. If the
action would advance \fImsg\fR\->pos beyond \fImsg\fR\->end,
\fImsg\fR\->pos is still advanced but no other action is taken.

.SH SEE ALSO

.P
IxpMsg(3), ixp_pstrings(3), ixp_pdata(3)

.\" man code generated by txt2tags 2.6 (http://txt2tags.org)
.\" cmdline: txt2tags -o- ixp_pstring.man3
